﻿@model Model.major_change

@{
    ViewData["Title"] = "list";
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="../../css/table.css" type="text/css" />
    <script src="~/jquery.js"></script>
    <script src="~/vue.js"></script>
</head>

<body>
    <div id="app">
        <form method="post" action="check_list.html">
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">您正在做的业务是：人力资源--调动管理--调动审核列表</font>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="new_first_kind_id" class="form-control" id="first_kind_id" />
                        <span asp-validation-for="new_first_kind_id" class="text-danger"></span>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="new_second_kind_id" class="form-control" id="second_kind_id" />
                        <span asp-validation-for="new_second_kind_id" class="text-danger"></span>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="new_third_kind_id" class="form-control" id="third_kind_id" />
                        <span asp-validation-for="new_third_kind_id" class="text-danger"></span>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="new_major_kind_id" class="form-control" id="third_kind_id" />
                        <span asp-validation-for="new_major_kind_id" class="text-danger"></span>
                    </td>
                    <td hidden="hidden">
                        <input asp-for="new_major_id" class="form-control" id="third_kind_id" />
                        <span asp-validation-for="new_major_id" class="text-danger"></span>
                    </td>
                </tr>

                <tr>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                  
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr height="21">
                    <td width="19%" class="TD_STYLE1">
                        I级机构
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        II级机构
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        Ⅲ级机构
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        薪酬标准
                    </td>
                    <td width="19%" class="TD_STYLE1">
                        名字
                    </td>
                    <td width="5%" class="TD_STYLE1">
                        查看
                    </td>

                </tr>

                <tr v-for="item in dt" :key="item.mch_id">
                    <td class="TD_STYLE2">{{item.new_first_kind_name}}</td>
                    <td class="TD_STYLE2">{{item.new_second_kind_name}}</td>
                    <td class="TD_STYLE2">{{item.new_third_kind_name}}</td>
                    <td class="TD_STYLE2">{{item.salary_standard_name}}</td>
                    <td class="TD_STYLE2">{{item.human_name}}</td>
                    <td class="TD_STYLE2">
                        <a :href="'/transfer/detail/'+[item.mch_id]">查看</a>
                    </td>
                </tr>
            </table>
            <div align="center" style="font-size: 18px;color: gray">
                &nbsp;&nbsp;总数：
                <font style="color: maroon;font-weight: bold;">{{rows}}</font>
                例
                &nbsp;&nbsp;&nbsp;
                每页显示 <font style="color: maroon;font-weight: bold;">{{pageSize}}</font>
                条
                &nbsp;&nbsp;&nbsp;
                当前第 <font style="color: maroon;font-weight: bold;">{{currentPage}}</font>
                页
                &nbsp;&nbsp;&nbsp;共
                <font style="color: maroon;font-weight: bold;">{{pages}}</font>
                页
                <a style="color: navy;font-weight: bold" v-on:click="first()">首页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="prev()">上一页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="next()">下一页</a>

                <a style="color: navy;font-weight: bold"
                   v-on:click="last()">末页</a>
                &nbsp;&nbsp;&nbsp;跳到第
                <input id=page type=text v-model="tpage" class=input1 size=1>
                页&nbsp;&nbsp;
                <input type="image" v-on:click="tiao()" src="~/images/go.bmp" width=18 height=18 border=0>
            </div>
        </form>
    </div>
    <script type="text/javascript">
        var vm = new Vue({
            el: "#app",
            data: {
                dt: [],
                rows: 0,
                pages: 0,
                currentPage: 1,
                pageSize: 1,
                tpage: 1
            },
            methods: {
                load: function () {
                    var t = this;
                    $.ajax({
                        url: "/transfer/Feye?id=" + t.currentPage,
                        type: "get",
                        success: function (msg) {
                            var d = eval(msg);
                            t.dt = d["list"];
                            t.rows = d["rows"];
                            t.pages = d["pages"];
                        }
                    });
                },
                //首页
                first: function () {
                    this.currentPage = 1;
                    this.load();
                },
                //下一页
                next: function () {
                    if (this.currentPage < this.pages) {
                        this.currentPage++;
                    } else {
                        this.currentPage = this.pages;
                    }

                    this.load();
                },
                //上一页
                prev: function () {
                    if (this.currentPage > 1) {
                        this.currentPage--;
                    } else {
                        this.currentPage = 1;
                    }
                    this.load();

                },
                //尾页
                last: function () {
                    this.currentPage = this.pages;
                    this.load();
                },
                //跳转
                tiao: function () {
                    var tiaoA = $("#page").val();
                    if (tiaoA > 0 && tiaoA <= this.pages) {
                        this.currentPage = tiaoA;
                    } else {
                        alert("不好意思，该页面不存在(自动跳首页)");
                        this.currentPage = 1;
                    }
                    var t = this;
                    $.ajax({
                        url: "/transfer/Feye?id=" + t.currentPage,
                        type: "get",
                        success: function (msg) {

                            var d = eval(msg);
                            t.dt = d["list"];
                            t.rows = d["rows"];
                            t.pages = d["pages"];
                        }
                    });
                },
            },
            mounted: function () {
                var t = this;
                var a = $("#new_first_kind_id").val();
                var b = $("#new_second_kind_id").val();
                var c = $("#new_third_kind_id").val();
                var d = $("#new_major_kind_id").val();
                var e = $("#new_major_id").val();
                $.ajax({
                    url: "/transfer/Feye?id=" + t.currentPage + "&a=" + a + "&b=" + b + "&c=" + c + "&d=" + d + "&e=" + e,
                    type: "get",
                    success: function (msg) {
                        var d = eval(msg);
                        t.dt = d["list"];
                        t.rows = d["rows"];
                        t.pages = d["pages"];
                    }
                });

            }

        });
    </script>
</body>
</html>
